<template>
  <div>
    Game
    <input type="text">
  </div>
</template>

<script>
export default {
  name: 'Game',
  mounted () {
    console.log('mounted')
  },

  beforeDestroy () {
    console.log('beforeDestroy')
  },

  /* 
  使用keep-alive, 也就是必须要有缓存
  activated: mounted之后调用第1次, 再回来时调用
  deactivated: 离开时调用
  */

  activated () {
    console.log('Game activated')
  },

  deactivated () {
    console.log('Game deactivated')
  }
}
</script>

<style scoped>

</style>
